package com.think.teaching.model;

import java.io.Serializable;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 文章
 * </p>
 *
 * @author think
 * @since 2020-08-12
 */
public class Article extends BaseModel<Article>{
	private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    /**
     * 文章标题
     */
    private String title;
    
    /**
     * 文章作者
     */
    private String author;
    
    /**
     * 文章封面图
     */
    private String image;
    
    /**
     * 文章类型
     */
    private int type;
    
    private int dataType;
    
    
    
    /**
     * 文章内容
     */
    private String content;
    
       
    @TableField(exist = false)
    private List<Integer> tagIds;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private ArticleType typeInfo;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private List<Tag> tags;

    
    public Article() {}
    
    public Article(Integer id,String title,String author,String image,int type,String content) {
    	this.id = id;
    	this.title = title;
    	this.author = author;
    	this.image = image;
    	this.type = type;
    	this.content= content;
    }
    
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getAuthor() {
		return author;
	}
    
    public void setAuthor(String author) {
		this.author = author;
	}
    
    public String getImage() {
		return image;
	}
    
    public void setImage(String image) {
		this.image = image;
	}
    
    public int getType() {
		return type;
	}
    
    public void setType(int type) {
		this.type = type;
	}
    
    public String getContent() {
		return content;
	}
    
    public void setContent(String content) {
		this.content = content;
	}
    
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
    
    @Override
    public String toString() {
        return "ArticleLesson{" +
        "id=" + id +
        ", author=" + author +
        ", content=" + content +
        "}";
    }

	public List<Tag> getTags() {
		return tags;
	}

	public void setTags(List<Tag> tags) {
		this.tags = tags;
	}

	public ArticleType getTypeInfo() {
		return typeInfo;
	}

	public void setTypeInfo(ArticleType typeInfo) {
		this.typeInfo = typeInfo;
	}

	public List<Integer> getTagIds() {
		return tagIds;
	}

	public void setTagIds(List<Integer> tagIds) {
		this.tagIds = tagIds;
	}

	public int getDataType() {
		return dataType;
	}

	public void setDataType(int dataType) {
		this.dataType = dataType;
	}

    
}
